/*
 * Created by SharpDevelop.
 * User: ffph9f
 * Date: 7/13/2008
 * Time: 8:27 PM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;

namespace Calk 
{
	/// <summary>
	/// Description of MainForm.
	/// </summary>
	public partial class MainForm : Form
	{
		public static void Main(string[] args)
		{
			Application.Run(new MainForm());
		}
		
		public MainForm()
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
			//
			// TODO: Add constructor code after the InitializeComponent() call.
			//
			moveButtons();
		}
		
		// Paints the background of the form with a GradientFill pattern.
		protected override void OnPaintBackground(PaintEventArgs e)
		{
		    // On Windows Mobile Pocket PC 2003, the call to GradientFill
		    // fails with GetLastError() returning 87 (ERROR_INVALID_PARAMETER)
		    // when e.Graphics is used.
		    // Instead, fill into a bitmap and then draw that onto e.Graphics.
		    Bitmap bm = new Bitmap(Width, Height);
		    Graphics gr = System.Drawing.Graphics.FromImage(bm);
		
		    GradientFill.Fill(
		        gr,
		        this.ClientRectangle,
		        Color.Black, Color.LightGray,
		        GradientFill.FillDirection.TopToBottom);
		    e.Graphics.DrawImage(bm, 0, 0);
		    gr.Dispose();
		    bm.Dispose();
		}


	}
}
